package Work;

import io.Student;

import java.io.FileInputStream;
import java.io.IOException;
import java.io.ObjectInputStream;

public class ois {
    public static void main(String[] args) {
        class OISDemo {
            public void main(String[] args) throws IOException, ClassNotFoundException {
                FileInputStream fis = new FileInputStream("student.txt");
                ObjectInputStream ois = new ObjectInputStream(fis);
                Object obj = ois.readObject();
                Student cjq = (Student) obj;
                System.out.println(cjq);
                ois.close();
            }
        }

    }
}